<?php
session_start();

//TODO:  Set permissions on what can be accessed based on access_level
//       Had issue where items below section being denied access would appear, but not be "clickable"

?>
<ul id="tree1" class="tree">
	<li class="folder f-open root"><span>Occam</span>
		<li class="folder f-open"><span>Copper</span>
			<ul>
				<li id="occamCopperAddForm" class="doc"><span><a>Add Copper Customer</a></span></li>
				<li id="occamCopperEditForm" class="doc"><span><a>Edit Copper Customer</a></span></li>
				<li id="occamCopperDiagForm" class="doc"><span><a>Diagnose Copper Customer</a></span></li>
			</ul>
		</li>
		<li class="folder root"><span>Fiber</span>
			<ul>
				<li id="occamFiberAddForm" class="doc"><span><a>Add Fiber Customer</a></span></li>	
				<li id="occamFiberEditForm" class="doc"><span><a>Edit Fiber Customer</a></span></li>	
				<li id="occamFiberDiagForm" class="doc"><span><a>Diagnose Fiber Customer</a></span></li>	
			</ul>
		</li>

	</li>
	<li class="folder root"><span>Metaswitch</span>
		<ul>
			<li id="metaswitchAddForm" class="doc"><span><a>Add Phone Customer</a></span></li>
			<li id="metaswitchEditForm" class="doc"><span><a>Edit Phone Customer</a></span></li>
			<li id="metaswitchQueryForm" class="doc"><span><a>Lookup Phone Customer</a></span></li>
		</ul>
	</li>
	<li class="folder f-open root"><span>Faulty Devices</span>
		<ul>
			<li id="faultySTB" class="doc"><span><a>Set Top Box</a></span></li>
			<li id="faultyModem" class="doc"><span><a>Modem</a></span></li>
			<li id="faultyOccamPort" class="doc"><span><a>Occam Port</a></span></li>
		</ul>
	</li>
</ul>

<script type="text/javascript">

	$('occamCopperEditForm').addEvent('click', function(e){
		MochaUI.updateContent({
			'element': $('mainPanel'),
			'loadMethod': 'xhr',
			'url': 'pages/occam_copper_edit_customer.php',
			'title': 'Edit Occam Copper Customer',
			'padding': { top: 8, right: 8, bottom: 8, left: 8 }
		});
		$('mainPanel').setStyle('background','#fff');
	});

	$('occamCopperAddForm').addEvent('click', function(e){
		MochaUI.updateContent({
			'element': $('mainPanel'),
			'loadMethod': 'xhr',
			'url': 'pages/occam_copper_add_customer.php',
			'title': 'Add Occam Copper Customer',
			'padding': { top: 8, right: 8, bottom: 8, left: 8 }
		});
		$('mainPanel').setStyle('background','#fff');
	});

	$('occamCopperDiagForm').addEvent('click', function(e){
		MochaUI.updateContent({
			'element': $('mainPanel'),
			'loadMethod': 'xhr',
			'url': 'pages/occam_copper_diag_customer.php',
			'title': 'Diagnose Occam Copper Customer',
			'padding': { top: 8, right: 8, bottom: 8, left: 8 }
		});
		$('mainPanel').setStyle('background','#fff');
	});

	$('occamFiberEditForm').addEvent('click', function(e){
		MochaUI.updateContent({
			'element': $('mainPanel'),
			'loadMethod': 'xhr',
			'url': 'pages/occam_fiber_edit_customer.php',
			'title': 'Edit Occam Fiber Customer',
			'padding': { top: 8, right: 8, bottom: 8, left: 8 }
		});
		$('mainPanel').setStyle('background','#fff');
	});

	$('occamFiberAddForm').addEvent('click', function(e){
		MochaUI.updateContent({
			'element': $('mainPanel'),
			'loadMethod': 'xhr',
			'url': 'pages/occam_fiber_add_customer.php',
			'title': 'Add Occam Fiber Customer',
			'padding': { top: 8, right: 8, bottom: 8, left: 8 }
		});
		$('mainPanel').setStyle('background','#fff');
	});

	$('occamFiberDiagForm').addEvent('click', function(e){
		MochaUI.updateContent({
			'element': $('mainPanel'),
			'loadMethod': 'xhr',
			'url': 'pages/occam_fiber_diag_customer.php',
			'title': 'Diagnose Occam Fiber Customer',
			'padding': { top: 8, right: 8, bottom: 8, left: 8 }
		});
		$('mainPanel').setStyle('background','#fff');
	});

	$('metaswitchAddForm').addEvent('click', function(e){
		MochaUI.updateContent({
			'element': $('mainPanel'),
			'loadMethod': 'xhr',
			'url': 'metaswitch/meta_create_sub.php',
			'title': 'Add Phone Customer',
			'padding': { top: 8, right: 8, bottom: 8, left: 8 }
		});
		$('mainPanel').setStyle('background','#fff');
	});
	
	$('metaswitchEditForm').addEvent('click', function(e){
		MochaUI.updateContent({
			'element': $('mainPanel'),
			'loadMethod': 'xhr',
			'url': 'metaswitch/meta_edit_sub.php',
			'title': 'Edit Phone Customer',
			'padding': { top: 8, right: 8, bottom: 8, left: 8 }
		});
		$('mainPanel').setStyle('background','#fff');
	});

	$('metaswitchQueryForm').addEvent('click', function(e){
		MochaUI.updateContent({
			'element': $('mainPanel'),
			'loadMethod': 'xhr',
			'url': 'metaswitch/meta_query_sub.php',
			'title': 'Lookup Phone Customer',
			'padding': { top: 8, right: 8, bottom: 8, left: 8 }
		});
		$('mainPanel').setStyle('background','#fff');
	});

	$('faultySTB').addEvent('click', function(e){
		MochaUI.updateContent({
			'element': $('mainPanel'),
			'loadMethod': 'xhr',
			'url': 'pages/faultySTB.php',
			'title': 'Faulty STB Form',
			'padding': { top: 8, right: 8, bottom: 8, left: 8 }
		});
		$('mainPanel').addStyle('background', '#fff');
	});

	$('faultyModem').addEvent('click', function(e){
		MochaUI.updateContent({
			'element': $('mainPanel'),
			'loadMethod': 'xhr',
			'url': 'pages/faultyModem.php',
			'title': 'Faulty Modem Form',
			'padding': { top: 8, right: 8, bottom: 8, left: 8 }
		});
		$('mainPanel').addStyle('background', '#fff');
	});

	$('faultyOccamPort').addEvent('click', function(e){
		MochaUI.updateContent({
			'element': $('mainPanel'),
			'loadMethod': 'xhr',
			'url': 'pages/faultyOccamPort.php',
			'title': 'Faulty Occam Port Form',
			'padding': { top: 8, right: 8, bottom: 8, left: 8 }
		});
		$('mainPanel').addStyle('background', '#fff');
	});

</script>
